package object;

public class Demo {
    public static void main(String[] args) {
        Point p = new Point(1,2);




        String str = p.toString();
        System.out.println(str);


        // 向控制台输出一个对象
        System.out.println(p);


        String line = "对象内容:"+p;
        System.out.println(line);


        Point p2 = new Point(1,2);



        System.out.println(p == p2); //false

        System.out.println(p.equals(p2)); //true


        System.out.println();


    }
}
